#include("../../layout/header.html")
#@layout()
#define content()
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
            <div class="layui-card">
                <div class="layui-card-header"><h2>CPU</h2></div>
                <div class="layui-card-body">
                    <table id="cpuTable" lay-filter="cpuTable"></table>
                </div>
            </div>
        </div>
        <div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
            <div class="layui-card">
                <div class="layui-card-header"><h2>内存</h2></div>
                <div class="layui-card-body">
                    <table id="ncTable" lay-filter="ncTable"></table>
                </div>
            </div>

            <div class="layui-card">
                <div class="layui-card-header"><h2>服务器信息</h2></div>
                <div class="layui-card-body">
                    <table id="fwqTable" lay-filter="fwqTable"></table>
                </div>
            </div>
        </div>

        <div class="layui-col-md12">

        </div>

        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header"><h2>Java虚拟机</h2></div>
                <div class="layui-card-body">
                    <table id="xnjTable" lay-filter="xnjTable"></table>
                </div>
            </div>
        </div>

        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header"><h2>磁盘状态</h2></div>
                <div class="layui-card-body">
                    <table id="cpTable" lay-filter="cpTable"></table>
                </div>
            </div>
        </div>
    </div>



</div>

<script>
    layui.use(['layer', 'form', 'table','tableX', 'util', 'admin', 'formX', 'laydate'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var table = layui.table;
        var tableX = layui.tableX;
        var formX = layui.formX;
        var laydate = layui.laydate;
        var admin = layui.admin;


        /* 渲染表格 */
        var cpuTb = tableX.init({
            elem:'#cpuTable',
            url: '/log/service/getCpu',
            height:'',
            page:false,
            cols: [[
                {type: 'numbers', title: '序号', fixed: 'left', minWidth: 80},
                {field: 'key', title: '属性'},
                {field: 'value', title: '值'},
            ]]
        })

        var ncTb = tableX.init({
            elem:'#ncTable',
            url: '/log/service/getNc',
            height:'',
            page:false,
            cols: [[
                {type: 'numbers', title: '序号', fixed: 'left', minWidth: 80},
                {field: 'key', title: '属性'},
                {field: 'value', title: '值'},
            ]]
        })

        var fwqTb = tableX.init({
            elem:'#fwqTable',
            url: '/log/service/getFwq',
            height:'',
            page:false,
            cols: [[
                {type: 'numbers', title: '序号', fixed: 'left', minWidth: 80},
                {field: 'key', title: '属性'},
                {field: 'value', title: '值'},
            ]]
        })

        var xnjTb = tableX.init({
            elem:'#xnjTable',
            url: '/log/service/getXnj',
            height:'',
            page:false,
            cols: [[
                {type: 'numbers', title: '序号', fixed: 'left', minWidth: 80},
                {field: 'key', title: '属性'},
                {field: 'value', title: '值'},
            ]]
        })

        var cpTb = tableX.init({
            elem:'#cpTable',
            url: '/log/service/getCp',
            height:'',
            page:false,
            cols: [[
                {type: 'numbers', title: '序号', fixed: 'left', minWidth: 80},
                {field: 'dirName', title: '盘符'},
                {field: 'fileType', title: '文件系统'},
                {field: 'typeName', title: '盘符类型'},
                {field: 'total', title: '总大小'},
                {field: 'free', title: '可用大小'},
                {field: 'used', title: '已用大小'},
                {field: 'usage', title: '已用百分比'},
            ]]
        })

    });
</script>
</body>
#end
